class Response{
    errorresponse(res,config){
        let {code,msg,err=null,data={}}=config;
        return res.send({status:code,message:msg,error:err,data})
    }
    successresponse(res,config,headers){
        let {code,message,data}=config;
        res.set(headers)
        return res.send({status:code,message,data})
    }
}

module.exports =new Response();
